<template>
	<view>
		<view class="infoView flex-row-flex-start">
			<!-- <image class="logo" :src="info.shop_logo" mode="aspectFill"></image> -->
			<view class="flex1">
				<view class="flex-row-space-between">
					<view class="name">
						{{info.shop_name}}
					</view>
					<!-- <view class="num">
						<text class="baseColor">{{info.litestoregoods.length}}</text>
						<text>件商品</text>
					</view> -->
				</view>
			<!-- 	<view class="describle">
					经营范围：{{info.op_object}}
				</view> -->
			</view>
		</view>
		<!-- <view class="tabView">
	
				<u-tabs  :list="tabs" :is-scroll="false" :current="tabCurrent" font-size="28" active-color="#333333"
					bar-width="80" :bar-style="{'background-color': '#65BEFF'}" @change="changeTab" />
		
		</view> -->
	<!-- 	<view v-if="!tabCurrent" class="">
			<lease :list="info.litestoregoods"></lease>
		</view> -->
		<view v-if="!tabCurrent"  class="infoView1">
		<!-- 	<view class="flex-row-space-between">
				<view class="flex1">
					<view class="title">
						商家地址
					</view>
					<view class="address">
					{{info.city}}{{info.op_area}}
					</view>
				</view>
		
				
			</view>
			<view class="line">
				
			</view> -->
			<view class="flex-row-space-between">
				<view class="flex1">
					<view class="title">
						商家电话
					</view>
					<view class="address">
						{{info.link_mobile}}
					</view>
				</view>
				<view @click="phoneClick()" class="flex-column-center" style="width: 80rpx;">
					<image class="navImage" src="/static/common/phone.png" mode="aspectFill"></image>
					<view class="navTitle">
						拨打
					</view>
				</view>
				
			</view>
			<!-- <view class="line">
				
			</view>
			<view class="title">
				商家照片
			</view>
			<view class="swipe" @click="swipeClick()">
				<swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000">
					<swiper-item  v-for="item in 11"  >
						
						<image  class="swipeImage" src="/static/problem/1.png" mode="aspectFill"></image>
					</swiper-item>
				</swiper>
					
			</view> -->
			
		</view>
	</view>
</template>

<script>
	import {
		storeDetail,
		getShopInfo
	} from '@/api/lease.js'
	export default {
		components: {},
		computed: {

		},
		data() {
			return {
				info:{},
				goodsList:[1,1,1],
				// Tabs列表
				tabs: [
				// 	{
				// 	key: '快递配送',
				// 	name: '全部商品'
				// },
				{
					key: '到点自取',
					name: '门店信息'
				},
				
				],
				tabCurrent: 0, 
				title:'',
				shop_id:1

			}
		},
		onShow() {

		},
		onLoad(e) {
			if(e && e.shop_id){
				this.shop_id=e.shop_id
			}
			if(e && !e.shop_id){
				uni.removeStorageSync('shop_id')
				uni.setStorageSync('shop_id', e)
				this.shop_id=e
			}
			if(e && e.title){
				this.title=e.title
				uni.setNavigationBarTitle({
					title:this.title
				})
			}
			this.getShopInfo()
		},
		//下拉刷新
		onPullDownRefresh() {


		},
		//加载更多
		onReachBottom() {

		},

		methods: {
			phoneClick(){
				uni.makePhoneCall({
					phoneNumber:this.info.link_mobile
				})
			},
			daohang(){
			
					let _this = this
					let latitude = Number(this.info.lat);
					let longitude = Number(this.info.lng);
					uni.openLocation({
						latitude: latitude,
						longitude: longitude,
						name: this.info.store_name,
						address: this.info.sf_address,
						success: function() {
							console.log('success');
						}
					});
			
			},
			// 切换Tabs
			changeTab(index) {
				this.tabCurrent = index;
			},
		getShopInfo(){
			getShopInfo({
				shop_id: this.shop_id
			}).then(({
				code,
				data
			}) => {
				if (code != 1) return;
				this.info=data
			});
		},
			showToast(title) {
				uni.showToast({
					title: title,
					icon: 'none'
				})
			},
			toUrl(url) {
				uni.navigateTo({
					url: url
				})
			},
		}
	}
</script>

<style lang="scss">
.infoView{
	padding: 0 20rpx;
	margin: 20rpx;
	height: 153rpx;
	background: #FFFFFF;
	border-radius: 11rpx 11rpx 11rpx 11rpx;
	opacity: 1;
}
.logo{
	margin-right: 12rpx;
	width: 115rpx;
	height: 115rpx;
	border-radius: 11rpx 11rpx 11rpx 11rpx;
	opacity: 1;
}
.name{
		margin-right: 12rpx;
	font-size: 31rpx;
	font-family: PingFang SC-Regular, PingFang SC;
	font-weight: 400;
	color: #333333;
}
.num{
	font-size: 27rpx;
	font-family: PingFang SC-Medium, PingFang SC;
	font-weight: 500;
	color: #333333;
}
.describle{
	margin-top: 10rpx;
	font-size: 25rpx;
	font-family: PingFang SC-Regular, PingFang SC;
	font-weight: 400;
	color: #666666;
}
.tabView{
	margin-bottom: 20rpx;
}
.infoView1{
	padding: 28rpx;
	margin: 20rpx;
	background: #FFFFFF;
	border-radius: 11rpx 11rpx 11rpx 11rpx;
	opacity: 1;
}
.title{
	font-size: 31rpx;
	font-family: PingFang SC-Medium, PingFang SC;
	font-weight: 550;
	color: #333333;
}
.address{
	margin-top: 12rpx;
	font-size: 27rpx;
	font-family: PingFang SC-Regular, PingFang SC;
	font-weight: 400;
	color: #666666;
}
.navImage{
	width: 38rpx;
	height: 38rpx;
}
.navTitle{
	margin-top: 10rpx;
	font-size: 27rpx;
	font-family: PingFang SC-Regular, PingFang SC;
	font-weight: 400;
	color: #333333;
}
.line{
	margin: 30rpx 0;
	height: 2rpx;
	background: #F6F9FB;
}
.swipe{
	margin-top: 30rpx;
			
height: 324rpx;
			image{
				border-radius: 11rpx;
				width: 100%;
				height: 100%;
				// height: 375px;
			}
		}
</style>